﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Yule8xCommon.Applib;

namespace Yule8xWeb.Webform.Login
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (RequestUtil.FormString("action") == "submit")
            {
                FormValidator validator = new FormValidator();
                validator.AddRule("login_name", "require", "用户名不能为空");
                validator.AddRule("password", "require", "密码不能为空");
                if (!validator.Validate())
                {
                    RedirectUtil.RedirectTimer(false,"登录失败",validator.Errors);
                }
                Response.Redirect("../Index/Default.aspx");
            }
        }
    }
}